home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 August / Ahoy_Magazine_87-08_1987_Double_L_Side_A.d64 / Small Straight (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  426b  |  12 lines

  1. 0 poke646,0:poke53280,12:poke53281,12
  2. 1 rem ==================================
  3. 2 rem    commodares problem #40-1 :
  4. 3 rem       small straight
  5. 4 rem    solution by
  6. 5 rem       harry stoddart
  7. 6 rem ==================================
  8. 10 print"the #'s:":for x=1 to 5:r=int(rnd(ti)*5+.5)+1:a(r)=a(r)+1:print r;:next
  9. 20 for y=1 to 3:for x=y to y+3:s(y)=s(y)+sgn(a(x)):next x:next y:print
  10. 30 print"the small straights are"1234*-(s(1)=4);2345*-(s(2)=4);3456*-(s(3)=4)
  11. 40 run
  12.